package com.zrrd.springboot_first.service.impl;

import com.zrrd.springboot_first.mapper.StudentMapper;
import com.zrrd.springboot_first.pojo.Student;
import com.zrrd.springboot_first.service.StudentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author WanJl
 * @version 1.0
 * @title StudentServiceImpl
 * @description
 * @create 2024/3/17
 */
@Service
public class StudentServiceImpl implements StudentService {

    @Resource
    StudentMapper studentMapper;

    @Override
    public List<Student> queryAll() {
        return studentMapper.queryAll();
    }

    @Override
    public Integer insert(Student student) {
        return studentMapper.insert(student);
    }

    @Override
    public Integer update(Student student) {
        return studentMapper.update(student);
    }

    @Override
    public Integer delete(Integer id) {
        return studentMapper.delete(id);
    }

    @Override
    public Student queryById(Integer id) {

        return studentMapper.queryById(id);
    }
}
